home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FM Towns: Free Software Collection 4
/
FM Towns Free Software Collection 4 - Disc 1.iso
/
msdos
/
css
/
demo2.c
< prev
next >
Wrap
C/C++ Source or Header
|
1991-10-18
|
777b
|
27 lines
#include "csscom.h"
double PI2,Q1,Q2,Q3,Y1,Y2,Y3,Y4;
_titleS[0]=0;gopen(0);GDS_setcompat(1);tpalet();
sprintf(_titleS, "SWEEP");
LTIME=1;DT=0.001;_xamt=1./LTIME;
sprintf(_grapS[0],"TIME");
sprintf(_grapS[1],"Y1/10+0.8");
sprintf(_grapS[2],"Y2/10+0.6");
sprintf(_grapS[3],"Y3/10+0.4");
sprintf(_grapS[4],"Y4/10+0.2");
PI2=2*3.14159;Q1=40*PI2;Q3=0.05*Q1;
_gtyp=11;_inigrap(_gtyp,_titleS,LTIME,_grapS,5);
for(TIME=0;TIME<=LTIME;TIME+=DT){
_zn=0;
Q3=0.05+TIME/1.0;
Y1=CMPXPL(0,Q1,0,Q1,0);
Y2=SIN(0,Q1,0);
Y3=SWPSIN(Q3,Q1);
Y4=SWPCOS(Q3,Q1);
_gpset(_gtyp, TIME, 0);
_gpset(_gtyp, Y1/10+0.8, 1);
_gpset(_gtyp, Y2/10+0.6, 2);
_gpset(_gtyp, Y3/10+0.4, 3);
_gpset(_gtyp, Y4/10+0.2, 4);
}
locate(78,22,CON);while(ESC!=getch());rpalet();gclose();putchar('\n');}